#!/usr/bin/env python
# -*- coding:utf-8 -*-

a='alex|123|1\neric|456|1\ntom|789|1'
f=file('e:\est.txt','w')
f.write(a)
f.close()

tmp={}
f=file('e:\est.txt','r')
list_line=f.readlines()
for list in list_line:
    line_list=list.strip().split('|')
    tmp[line_list[0]]=line_list[1:]
print tmp